package com.ly.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ly.demo.entity.Student;
import com.ly.demo.service.StudentService;
import com.ly.demo.mapper.StudentMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @author Administrator
 * @description 针对表【student】的数据库操作Service实现
 * @createDate 2024-03-27 16:54:20
 */
@Slf4j
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student>
        implements StudentService {
    @Resource
    private TeacherServiceImpl teacherService;

    @Transactional
    public void sun() {

        log.info("哈哈哈");

        teacherService.teacher();
        try {
            int i = 1 / 0;
        }catch (Exception e){
            log.error("xxx错误：{}", e.getMessage(), e);
        }

        log.debug("不好debug");

    }
}




